import Header from "@c/header/Header"
import SiteHeader from "@c/site_header/SiteHeader"
import HomeHero from "@c/home_hero/HomeHero";
import HomeMainPage from "@c/home_main_page/HomeMainPage";
import ToolBar from "@c/tool_bar/ToolBar";
import Footer from "@c/footer/footer";

function App(config) {

    const { el, components } = config
    this.root = el ? document.querySelector(el) : null;
    this.components = (components && components.length > 0) ? components : null;
    components.forEach(async c => {
        this.root.appendChild(await c);
    })
}


export default new App({
    el: '#app',
    components: [Header, SiteHeader, HomeHero, HomeMainPage, ToolBar, Footer]
})